package com.jtny.nytb.equipment.service;

import com.jtny.component.entity.PageData;
import com.jtny.component.exception.ServiceException;
import com.jtny.nytb.equipment.dto.dataalgorithm.*;
import com.jtny.nytb.equipment.vo.dataagorithm.*;
import org.springframework.transaction.annotation.Transactional;

/**
 * 数据算法基本信息管理biz类
 * @package com.jtny.nytb.config.generic.dataalgorithm.biz
 * @fileName DataAlgorithmBiz.java
 * @author 智慧能源中心-夏燕强
 * @createTime 2023年09月02日 14:05
 * @version 1.0
 * @Copyright© 2023 jtny
 * 江投能源技术研究院 版权所有
 */

public interface DataAlgorithmBiz {
    /**
     * 分页查询数据算法
     * @param dataAlgorithmPageQueryParamVO
     * @return
     * @throws ServiceException
     */
    PageData<DataAlgorithmBasicVO> queryPage(DataAlgorithmPageQueryParamVO dataAlgorithmPageQueryParamVO) throws ServiceException;

    /**
     * 保存数据算法
     * @param algorithmScriptAndFormulaVO
     * @return
     * @throws ServiceException
     */
//    DataAlgorithmScriptAndFormulaVO saveDataAlgorithm(DataAlgorithmScriptAndFormulaVO algorithmScriptAndFormulaVO) throws ServiceException;
//
    @Transactional(rollbackFor = Exception.class)
    DataAlgorithmScriptAndFormulaVO saveDataAlgorithm(DataAlgorithmScriptAndFormulaVO algorithmScriptAndFormulaVO) throws ServiceException;

    /**
     * 查看数据算法详情
     * @param algorithmId
     * @return
     * @throws ServiceException
     */
    DataAlgorithmScriptAndFormulaDTO detailDataAlgorithm(Long algorithmId) throws ServiceException;

    /**
     * 更新数据算法
     * @param dataAlgorithmScriptAndFormulaVO
     * @throws ServiceException
     */
//    void updateDataAlgorithm(DataAlgorithmScriptAndFormulaVO dataAlgorithmScriptAndFormulaVO) throws ServiceException;

    @Transactional(rollbackFor = Exception.class)
    void updateDataAlgorithm(DataAlgorithmScriptAndFormulaVO dataAlgorithmScriptAndFormulaVO) throws ServiceException;

    /**
     * 删除数据算法
     * @param algorithmId
     * @throws ServiceException
     */
    void deleteDataAlgorithm(Long algorithmId) throws ServiceException;

    /**
     * 禁用数据算法
     * @param algorithmId
     * @return
     * @throws ServiceException
     */
    DataAlgorithmBasicVO disableDataAlgorithm(Long algorithmId) throws ServiceException;

    /**
     * 启用数据算法
     * @param algorithmId
     * @return
     * @throws ServiceException
     */
    DataAlgorithmBasicVO enableDataAlgorithm(Long algorithmId) throws ServiceException;

    /**
     * 删除数据算法
     * @param algorithmId
     * @throws ServiceException
     */
    void deleteParamConfig(Long algorithmId);
}
